import { reqSearchList } from '@/api'
const state = {
    // search模块需要数据
    searchList: {}
};
const mutations = {
    GETSEARCHLIST: (state, payload) => {
        state.searchList = payload;
    }
};
const actions = {

    getSearchList: async ({ state, commit, dispatch }, payload) => {
        // 当前这个接口函数要携带参数,至少一个空对象
        let result = await reqSearchList(payload);
        if (result.code == 200) {
            commit('GETSEARCHLIST', result.data);
        }
    }
};
const getters = {};

// 默认暴露
export default {
    state,
    mutations,
    actions,
    getters
}